package com.yanqu.road.server.manger.union.listener;

import com.yanqu.road.entity.activity.ActivityConditionInfo;
import com.yanqu.road.entity.activity.ActivityInfo;
import com.yanqu.road.entity.activity.UserActivityConditionData;
import com.yanqu.road.entity.activity.dafuweng.DFWConfig;
import com.yanqu.road.entity.activity.seacraft.pirateriot.config.SeacraftPirateRiotConfig;
import com.yanqu.road.entity.enums.activity.eActivityCookBoyType;
import com.yanqu.road.entity.enums.eActivityType;
import com.yanqu.road.entity.enums.eGamePlayerEventType;
import com.yanqu.road.entity.enums.eUnionSyncType;
import com.yanqu.road.entity.task.args.CommonActivityUnionRiseRankArgs;
import com.yanqu.road.entity.task.args.OreWarActivityUnionRiseRankArgs;
import com.yanqu.road.entity.task.args.RelationActivityUnionRiseRankArgs;
import com.yanqu.road.entity.task.args.UnionRiseRankArgs;
import com.yanqu.road.entity.union.cross.CrossUnionInfo;
import com.yanqu.road.entity.union.cross.CrossUnionMember;
import com.yanqu.road.logic.bussiness.player.UserActivityBussiness;
import com.yanqu.road.logic.bussiness.player.UserCommonActivityBussiness;
import com.yanqu.road.logic.bussiness.player.UserTradeWarActivityBussiness;
import com.yanqu.road.logic.helper.ActivityHelper;
import com.yanqu.road.server.GameServer;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.activity.orewar.OreWarActivityModule;
import com.yanqu.road.server.gameplayer.module.activity.strongholdwar.StrongholdModule;
import com.yanqu.road.server.gameplayer.module.player.OreWarModule;
import com.yanqu.road.server.manger.ICrossUnionSyncListener;
import com.yanqu.road.server.manger.activity.*;
import com.yanqu.road.server.manger.activity.bowart.BowArtMgr;
import com.yanqu.road.server.manger.activity.dafuweng.DaFuWengMgr;
import com.yanqu.road.server.manger.activity.dragonboatrace.DragonBoatRaceMgr;
import com.yanqu.road.server.manger.activity.ghost.GhostMgr;
import com.yanqu.road.server.manger.activity.orewar.OreWarActivityMgr;
import com.yanqu.road.server.manger.activity.seacraft.SeacraftPirateRiotMgr;
import com.yanqu.road.server.manger.activity.strongholdwar.StrongholdActivityMgr;
import com.yanqu.road.server.manger.activity.tonbing.TonBingMgr;
import com.yanqu.road.server.manger.activity.tonbingchannel.ChannelTonBingMgr;
import com.yanqu.road.server.manger.activity.tongbing.TongBingMgr;
import com.yanqu.road.server.manger.player.UserMgr;
import com.yanqu.road.server.manger.player.GamePlayerMgr;
import com.yanqu.road.server.manger.union.CrossUnionMgr;
import com.yanqu.road.server.manger.union.UnionActivityMgr;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class UnionActivityJoinListener implements ICrossUnionSyncListener {


    @Override
    public void notifySync(int syncType, long playerId, CrossUnionInfo unionInfo, List<CrossUnionMember> memberList) {

        if(syncType == eUnionSyncType.CreateUnion.getValue() || syncType == eUnionSyncType.JoinUnion.getValue()){

            for (CrossUnionMember member : memberList) {
                if(member.getServerId() != GameServer.getInstance().getServerId()){
                    continue;
                }
                memberJoinUnionActivityChange(member.getUserId(), unionInfo.getUnionUid());
            }

        }

        if(syncType == eUnionSyncType.DeleteUnion.getValue()){

            for (CrossUnionMember member : memberList) {
                if(member.getServerId() == GameServer.getInstance().getServerId() && member.getUserId() == playerId){
                    GamePlayer player = GamePlayerMgr.getOnlinePlayer(playerId);
                    if(player != null) {
                        notifyUnionActivityDeleteRank(player, unionInfo.getUnionUid());
                    }
                }
            }

        }

    }

    private static void memberJoinUnionActivityChange(long userId, String unionUid) {
        memberJoinUnionCommonActivityChange(userId, unionUid);
        memberJoinUnionOreWarActivityChange(userId, unionUid);
        memberJoinUnionCrossTradeWarChange(userId, unionUid);
        memberJoinUnionCrossStrongholdChange(userId, unionUid);
        memberJoinUnionDfwChange(userId, unionUid);
        memberJoinUnionBowArtChange(userId, unionUid);
        memberJoinUnionGhostChange(userId, unionUid);
        TongBingMgr.unionChange(unionUid);
        TonBingMgr.unionChange(unionUid);
//        ChannelTonBingMgr.unionChange(unionUid);
        memberJoinUnionDragonBoatRaceChange(userId, unionUid);
        memberJoinUnionRelationActivityChange(userId, unionUid);
        memberJoinUnionSeacraftPirateRiotChange(userId, unionUid);

        GamePlayer player = GamePlayerMgr.getOnlinePlayer(userId);
        if (null != player) {
            player.getModule(OreWarModule.class).syncData();
            player.getModule(OreWarActivityModule.class).syncActivity();
            player.notifyListener(eGamePlayerEventType.JoinUnionActivityCondition.getValue(),player.getUserInfo());  //玩家在线才更新 不在线可以等在线再说
            player.notifyListener(eGamePlayerEventType.UnionExpRiseRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_JOIN, BigInteger.ZERO, unionUid));
            player.notifyListener(eGamePlayerEventType.UnionTradeWarScoreRiseRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_JOIN, BigInteger.ZERO, unionUid));
            player.notifyListener(eGamePlayerEventType.UnionIntimacyRiseRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_JOIN, BigInteger.ZERO, unionUid));
            player.notifyListener(eGamePlayerEventType.UnionAbilityRiseRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_JOIN, BigInteger.ZERO, unionUid));
            player.notifyListener(eGamePlayerEventType.UnionEarnSpeedRiseRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_JOIN, BigInteger.ZERO, unionUid));
        } else {
            List<ActivityInfo> activityInfoList = NormalActivityMgr.getUnionRiseRankActivityList();
            for (ActivityInfo activityInfo : activityInfoList) {
                List<ActivityConditionInfo> activityConditionInfoList = NormalActivityMgr.getActivityConditionInfoList(activityInfo.getActivityId());
                UserActivityConditionData userActivityConditionData = null;
                if (null != activityConditionInfoList && activityConditionInfoList.size() > 0) {
                    userActivityConditionData = UserActivityBussiness.getUserActivityConditionData(activityInfo.getActivityId(), userId);
                    if (null == userActivityConditionData) {
                        userActivityConditionData = NormalActivityMgr.initUserActivityConditionData(userId, UserMgr.getNickName(userId), BigInteger.ZERO,
                                activityInfo.getActivityId(), activityConditionInfoList.get(0).getConditionId(), activityConditionInfoList.get(0).getType());
                        UserActivityBussiness.addUserActivityConditionData(userActivityConditionData);
                    }
                }
                if (null != userActivityConditionData) {
                    UnionActivityMgr.changeUnionActivityValue(activityInfo.getActivityId(), unionUid, userActivityConditionData.getUserId(), userActivityConditionData, UnionRiseRankArgs.NOTIFY_TYPE_JOIN);
                }
            }
        }
    }

    /**
     * 成员加入商会，万能活动商会处理
     */
    private static void memberJoinUnionCommonActivityChange(long userId, String unionUid) {
        GamePlayer player = GamePlayerMgr.getOnlinePlayer(userId);
        List<ActivityInfo> activityInfoList = CommonActivityMgr.getInTimeCommonActivityInfoList(eActivityType.CommonActivity.getValue());
        if (null != player) {
            for (ActivityInfo activityInfo : activityInfoList) {
                player.notifyListener(eGamePlayerEventType.CommonActivityScoreRiseRank.getValue(),
                        new CommonActivityUnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_JOIN, BigInteger.ZERO, unionUid, activityInfo.getChildType()));
            }
        } else {
            for (ActivityInfo activityInfo : activityInfoList) {
                List<ActivityConditionInfo> activityConditionInfoList = CommonActivityMgr.getCommonActivityConditionInfoList(activityInfo.getActivityId(),
                        ActivityHelper.COMMON_ACTIVITY_CONDITION_TYPE_UNION);
                UserActivityConditionData userActivityConditionData = null;
                if (null != activityConditionInfoList && activityConditionInfoList.size() > 0) {
                    List<UserActivityConditionData> conditionDataList = UserCommonActivityBussiness.getUserActivityConditionDataList(activityInfo.getActivityId(), userId,
                            ActivityHelper.COMMON_ACTIVITY_CONDITION_TYPE_UNION);
                    for (UserActivityConditionData conditionData : conditionDataList) {
                        ActivityConditionInfo conditionInfo = CommonActivityMgr.getCommonActivityConditionInfo(activityInfo.getActivityId(), conditionData.getConditionId());
                        if (conditionInfo.getType() == ActivityHelper.COMMON_ACTIVITY_CONDITION_TYPE_UNION) {
                            userActivityConditionData = conditionData;
                            break;
                        }
                    }
                    if (null == userActivityConditionData) {
                        userActivityConditionData = NormalActivityMgr.initUserActivityConditionData(userId, UserMgr.getNickName(userId), BigInteger.ZERO,
                                activityInfo.getActivityId(), activityConditionInfoList.get(0).getConditionId(), activityConditionInfoList.get(0).getType());
                        UserCommonActivityBussiness.addUserCommonActivityConditionData(userActivityConditionData);
                    }
                }
                if (null != userActivityConditionData) {
                    CommonActivityRankMgr.changeUnionActivityValue(activityInfo.getActivityId(), unionUid, userActivityConditionData.getUserId(), userActivityConditionData, UnionRiseRankArgs.NOTIFY_TYPE_JOIN);
                }
            }
        }
    }

    /**
     * 成员加入商会，盐场活动商会处理
     */
    private static void memberJoinUnionOreWarActivityChange(long userId, String unionUid) {
        List<ActivityInfo> activityInfoList = OreWarActivityMgr.getOpenActivityInfoList();
        for (ActivityInfo activityInfo : activityInfoList) {
            if (activityInfo.getChildType() == 1) {
                OreWarActivityMgr.conditionNotify(userId, eGamePlayerEventType.OreWarAcCoinOutPut.getValue(),
                        new OreWarActivityUnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_JOIN, BigInteger.ZERO, unionUid, activityInfo.getActivityId()));
            } else if (activityInfo.getChildType() == 2) {
                OreWarActivityMgr.conditionNotify(userId, eGamePlayerEventType.CrossOreWarAcCoinOutPut.getValue(),
                        new OreWarActivityUnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_JOIN, BigInteger.ZERO, unionUid, activityInfo.getActivityId()));
            }
        }
    }

    /**
     * 成员加入商会，跨服商战活动商会处理
     */
    private static void memberJoinUnionCrossTradeWarChange(long userId, String unionUid) {
        ActivityInfo activityInfo = TradeWarActivityMgr.getInTimeActivityInfo();
        if (null == activityInfo) {
            return;
        }
        if (!TradeWarActivityMgr.unionCanCrossTradeWar(unionUid)) {//没有资格的商会
            return;
        }
        GamePlayer player = GamePlayerMgr.getOnlinePlayer(userId);
        if (null != player) {
            player.notifyListener(eGamePlayerEventType.CrossTradeWarUnionScoreRiseRank.getValue(),
                    new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_JOIN, BigInteger.ZERO, unionUid));
        } else {
            List<ActivityConditionInfo> activityConditionInfoList = TradeWarActivityMgr.getActivityConditionInfoList(activityInfo.getActivityId(), TradeWarActivityMgr.CONDITION_TYPE_UNION);
            UserActivityConditionData userActivityConditionData = null;
            if (null != activityConditionInfoList && activityConditionInfoList.size() > 0) {
                List<UserActivityConditionData> conditionDataList = UserTradeWarActivityBussiness.getUserActivityConditionDataList(activityInfo.getActivityId(), userId, TradeWarActivityMgr.CONDITION_TYPE_UNION);
                for (UserActivityConditionData conditionData : conditionDataList) {
                    ActivityConditionInfo conditionInfo = TradeWarActivityMgr.getActivityConditionInfo(activityInfo.getActivityId(), conditionData.getConditionId());
                    if (conditionInfo.getType() == TradeWarActivityMgr.CONDITION_TYPE_UNION) {
                        userActivityConditionData = conditionData;
                        break;
                    }
                }
                if (null == userActivityConditionData) {
                    userActivityConditionData = NormalActivityMgr.initUserActivityConditionData(userId, UserMgr.getNickName(userId), BigInteger.ZERO,
                            activityInfo.getActivityId(), activityConditionInfoList.get(0).getConditionId(), activityConditionInfoList.get(0).getType());
                    UserTradeWarActivityBussiness.addUserActivityConditionData(userActivityConditionData);
                }
            }
            if (null != userActivityConditionData) {
                TradeWarActivityRankMgr.changeUnionActivityValue(activityInfo.getActivityId(), unionUid, userActivityConditionData.getUserId(),
                        userActivityConditionData, UnionRiseRankArgs.NOTIFY_TYPE_JOIN);
            }
        }
    }

    private static void memberJoinUnionCrossStrongholdChange(long userId, String unionUid) {
        ActivityInfo activityInfo = StrongholdActivityMgr.getOpenActivityInfo();
        if (activityInfo != null && !StrongholdActivityMgr.isGameFinish()) {
            GamePlayer player = GamePlayerMgr.getOnlinePlayer(userId);
            if (player != null) {
                player.getModule(StrongholdModule.class).syncUserData();
            }
            StrongholdActivityMgr.conditionNotify(userId, eGamePlayerEventType.StrongholdWildScoreRank.getValue(),
                    new OreWarActivityUnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_JOIN, BigInteger.ZERO, unionUid, activityInfo.getActivityId()));
            StrongholdActivityMgr.conditionNotify(userId, eGamePlayerEventType.StrongholdEliminateRank.getValue(),
                    new OreWarActivityUnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_JOIN, BigInteger.ZERO, unionUid, activityInfo.getActivityId()));
        }
    }

    private static void memberJoinUnionDfwChange(long userId, String unionUid) {
        try {
            DaFuWengMgr.notifyUnionData(GamePlayerMgr.getOnlinePlayer(userId));
            DaFuWengMgr.unionMemberChange(new ArrayList<>(CrossUnionMgr.getUnionMemberMap(unionUid).keySet()));
            DFWConfig dfwConfig = DaFuWengMgr.getDfwConfig();
            if (dfwConfig == null) {
                return;
            }
            if (ActivityMgr.activityInTime(dfwConfig.getActivityInfo())) {
                int activityId = dfwConfig.getActivityInfo().getActivityId();
                List<Integer> typeList = NormalActivityMgr.getActivityConditionUnionRankType(activityId);
                for (Integer type : typeList) {
                    List<UserActivityConditionData> dataList = UserActivityBussiness.getUserActivityConditionDataListByUserIdAndType(activityId, userId, type);
                    if (dataList != null && dataList.size() > 0) {
                        UserActivityConditionData userActivityConditionData = dataList.get(0);
                        GeneralActivityRankMgr.changeUnionActivityValue(dfwConfig.getActivityInfo().getActivityId(), type, unionUid, userId, userActivityConditionData, UnionRiseRankArgs.NOTIFY_TYPE_JOIN);
                    }
                }
            }

        } catch (Exception e) {

        }
    }

    private static void memberJoinUnionBowArtChange(long userId, String unionUid){
        try{
            ActivityInfo activityInfo = BowArtMgr.getActivityInfo();
            if(ActivityMgr.activityInTime(activityInfo)){
                int activityId = activityInfo.getActivityId();
                List<Integer> typeList = NormalActivityMgr.getActivityConditionUnionRankType(activityId);
                for (Integer type : typeList) {
                    List<UserActivityConditionData> dataList = UserActivityBussiness.getUserActivityConditionDataListByUserIdAndType(activityId, userId, type);
                    if (dataList != null && dataList.size() > 0) {
                        UserActivityConditionData userActivityConditionData = dataList.get(0);
                        GeneralActivityRankMgr.changeUnionActivityValue(activityId, type, unionUid, userId, userActivityConditionData, UnionRiseRankArgs.NOTIFY_TYPE_JOIN);
                    }
                }
            }
        }catch (Exception e) {

        }
    }

    private static void memberJoinUnionGhostChange(long userId, String unionUid) {
        try {
            ActivityInfo activityInfo = GhostMgr.getActivityInfo();
            if (ActivityMgr.activityInTime(activityInfo)) {
                int activityId = activityInfo.getActivityId();
                List<Integer> typeList = NormalActivityMgr.getActivityConditionUnionRankType(activityId);
                for (Integer type : typeList) {
                    List<UserActivityConditionData> dataList = UserActivityBussiness.getUserActivityConditionDataListByUserIdAndType(activityId, userId, type);
                    if (dataList != null && dataList.size() > 0) {
                        UserActivityConditionData userActivityConditionData = dataList.get(0);
                        GeneralActivityRankMgr.changeUnionActivityValue(activityId, type, unionUid, userId, userActivityConditionData, UnionRiseRankArgs.NOTIFY_TYPE_JOIN);
                    }
                }
            }
        } catch (Exception e) {

        }
    }

    private static void memberJoinUnionDragonBoatRaceChange(long userId, String unionUid){
        try{
            if(ActivityMgr.activityInTime(DragonBoatRaceMgr.getActivityInfo())){
                int activityId = DragonBoatRaceMgr.getActivityInfo().getActivityId();
                List<Integer> typeList = NormalActivityMgr.getActivityConditionUnionRankType(activityId);
                for (Integer type : typeList) {
                    List<UserActivityConditionData> dataList = UserActivityBussiness.getUserActivityConditionDataListByUserIdAndType(activityId, userId, type);
                    if (dataList != null && dataList.size() > 0) {
                        UserActivityConditionData userActivityConditionData = dataList.get(0);
                        GeneralActivityRankMgr.changeUnionActivityValue(activityId, type, unionUid, userId, userActivityConditionData, UnionRiseRankArgs.NOTIFY_TYPE_JOIN);
                    }
                }
            }
        }catch (Exception e) {

        }
    }

    /**
     * 成员加入商会，盐场活动商会处理
     */
    private static void memberJoinUnionRelationActivityChange(long userId, String unionUid) {
        List<ActivityInfo> activityInfoList = RelationActivityMgr.getOpenActivityInfoList();
        for (ActivityInfo activityInfo : activityInfoList) {
            if (activityInfo.getType() == eActivityType.CookingBoyActivity.getValue() && activityInfo.getChildType() == eActivityCookBoyType.Process1.getChildType()) {
                if (ActivityMgr.activityInTime(activityInfo)) {
                    RelationActivityMgr.conditionNotify(activityInfo.getActivityId(),userId, eGamePlayerEventType.CookBoy1IntegralUserCrossRank.getValue(),
                            new RelationActivityUnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_JOIN, BigInteger.ZERO, unionUid, activityInfo.getActivityId()));
                }
            } else if (activityInfo.getType() == eActivityType.CookingBoyActivity.getValue() && activityInfo.getChildType() == eActivityCookBoyType.Process2.getChildType()) {
                //其他两个活动没有

            }
        }
    }

    private static void memberJoinUnionSeacraftPirateRiotChange(long userId, String unionUid) {
        try {
            SeacraftPirateRiotConfig config = SeacraftPirateRiotMgr.getPirateRiotConfig();
            if (SeacraftPirateRiotMgr.inUnionRankChangeTime(config)) {
                int activityId = config.getActivityInfo().getActivityId();
                List<Integer> typeList = Collections.singletonList(eGamePlayerEventType.SeacraftPirateRiotUnionScoreRank.getValue());
                for (Integer type : typeList) {
                    List<UserActivityConditionData> dataList = UserActivityBussiness.getUserActivityConditionDataListByUserIdAndType(activityId, userId, type);
                    if (dataList != null && dataList.size() > 0) {
                        UserActivityConditionData userActivityConditionData = dataList.get(0);
                        GeneralActivityRankMgr.changeUnionActivityValue(activityId, type, unionUid, userId, userActivityConditionData, UnionRiseRankArgs.NOTIFY_TYPE_JOIN);
                    }
                }
            }
        } catch (Exception e) {

        }
    }

    private static void notifyUnionActivityDeleteRank(GamePlayer player, String unionUid) {
        player.notifyListener(eGamePlayerEventType.UnionExpRiseRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_DELETE, BigInteger.ZERO, unionUid));
        player.notifyListener(eGamePlayerEventType.UnionIntimacyRiseRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_DELETE, BigInteger.ZERO, unionUid));
        player.notifyListener(eGamePlayerEventType.UnionTradeWarScoreRiseRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_DELETE, BigInteger.ZERO, unionUid));
        player.notifyListener(eGamePlayerEventType.UnionAbilityRiseRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_DELETE, BigInteger.ZERO, unionUid));
        player.notifyListener(eGamePlayerEventType.UnionEarnSpeedRiseRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_DELETE, BigInteger.ZERO, unionUid));
        player.notifyListener(eGamePlayerEventType.OreWarAcCoinOutPut.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_DELETE, BigInteger.ZERO, unionUid));
        player.notifyListener(eGamePlayerEventType.CrossOreWarAcCoinOutPut.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_DELETE, BigInteger.ZERO, unionUid));
        player.notifyListener(eGamePlayerEventType.DaFuWengUnionScoreRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_DELETE, BigInteger.ZERO, unionUid));
        player.notifyListener(eGamePlayerEventType.DaFuWengUnionDamageRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_DELETE, BigInteger.ZERO, unionUid));
        player.notifyListener(eGamePlayerEventType.BowArtActivityUnionScoreRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_DELETE, BigInteger.ZERO, unionUid));
        player.notifyListener(eGamePlayerEventType.BowArtActivityUnionScoreCrossRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_DELETE, BigInteger.ZERO, unionUid));
        player.notifyListener(eGamePlayerEventType.GhostUnionScoreRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_DELETE, BigInteger.ZERO, unionUid));
        player.notifyListener(eGamePlayerEventType.HangHaiUnionMoneyRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_DELETE, BigInteger.ZERO, unionUid));
        player.notifyListener(eGamePlayerEventType.DragonBoatRaceActivityUnionScoreRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_DELETE, BigInteger.ZERO, unionUid));
        player.notifyListener(eGamePlayerEventType.DragonBoatRaceActivityUnionScoreCrossRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_DELETE, BigInteger.ZERO, unionUid));
        player.notifyListener(eGamePlayerEventType.CookBoy1IntegralUserCrossRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_DELETE, BigInteger.ZERO, unionUid));
        player.notifyListener(eGamePlayerEventType.SeacraftPirateRiotUnionScoreRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_DELETE, BigInteger.ZERO, unionUid));
        player.notifyListener(eGamePlayerEventType.LangYaUnionScoreRank.getValue(), new UnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_DELETE, BigInteger.ZERO, unionUid));
        List<ActivityInfo> dataList = CommonActivityMgr.getInTimeCommonActivityInfoList(eActivityType.CommonActivity.getValue());
        for (ActivityInfo activityInfo : dataList) {
            player.notifyListener(eGamePlayerEventType.CommonActivityScoreRiseRank.getValue(), new CommonActivityUnionRiseRankArgs(UnionRiseRankArgs.NOTIFY_TYPE_DELETE, BigInteger.ZERO, unionUid, activityInfo.getChildType()));
        }
    }
}
